package nobodyCodesThat;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.ImageLoader;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;

public class Singleton {

	private static Singleton itsInstance;

	public static synchronized Singleton getInstance() {
		if (itsInstance == null)
			itsInstance = new Singleton();
		return itsInstance;
	}

	private Singleton() {
	}

	public String getKey(String string) {
		String tempString = null;
		try {
			tempString = bundle.getString(string);
		} catch (MissingResourceException e) {
			System.out.println("Missing key: " + string);
		}
		return tempString;
	}

	private ResourceBundle bundle = ResourceBundle.getBundle("PFO");

	public Display display;

	public Shell shell;

	public CopyThread copyThread;

	public Combo comboCopyHistory, comboCycleTime;

	public Button buttonMain, buttonRestore, buttonSettings, openInputFolder,
			buttonStart, buttonEnd;

	public Table tableHistorySave, tableProfiles;

	public Group groupMAIN, groupRESTORE, groupSETTINGS, groupMainButtons,
			groupRestoreButtons, groupSettingsCombos;

	public Label labelInputFolder;

	public Text textInputFolder;

	public String inputFolder;

	public String[] copyNames;

	public int copyHistory;

	public int cycleTime;

	public boolean alreadyStartedTQ = false;

	public int currentSaveGameNumber;

	public long time;

	public int animImageNumber = 0;

	public boolean running;

	public ImageLoader loader;

	public Canvas canvasAnimGif;

	public GC gc;
}
